﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using shenghua.Common.CustomValueType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Common.Articles
{
    public class Article : Entity, ICreationAudited, IModificationAudited
    {
        public string Title { get; set; }

        public ValueArray<string> Tags { get; set; }

        public string Author { get; set; }

        public string Source { get; set; }

        /// <summary>
        /// 简介
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 封面
        /// </summary>
        public string Picture { get; set; }

        public ValueArray<string> Pictures { get; set; }

        public string Content { get; set; }

        public ArticleSystemType SystemType { get; set; } 

        public string Type1 { get; set; }
        public string Type2 { get; set; }
        public string Type3 { get; set; }

        /// <summary>
        /// 评论数
        /// </summary>
        public int CommentCount { get; set; }
        /// <summary>
        /// 点击量
        /// </summary>
        public int ClickCount { get; set; }

        public ArticleStatus Status { get; set; }
        public bool Enabled { get; set; }

        public DateTime CreationTime { get; set; }
        public long? CreatorUserId { get; set; }
        public long? LastModifierUserId { get; set; }
        public DateTime? LastModificationTime { get; set; }
    }

    public enum ArticleStatus
    {
        Draft = 0,
        PendingAudit,
        Audited,
    }

    public enum ArticleSystemType
    {
        /// <summary>
        /// 公司资讯
        /// </summary>
        CompanyInformation = 1,
        /// <summary>
        /// 微课堂
        /// </summary>
        MicroClassroom = 2,
        /// <summary>
        /// 企业通知
        /// </summary>
        Notice = 3
    }
}
